# -*- coding: utf-8 -*-
from django.conf.urls import url, include
from .views import *

good_list = GoodListViewSet.as_view({
    'get': 'list',
    'post': 'create',  # 自动生成html表单
})

good_multimedia_list = GoodMultimediaListViewSet.as_view({
    'get': 'list',
    'post': 'create',
})

good_multimedia_with_detailed_good_list = GoodMultimediaWithDetailedGoodListViewSet.as_view({
    'get': 'list',
    # 'post': 'create',  # 必须同时Good和GoodMultiMedia
})


# `create()`, `retrieve()`, `update()`,`partial_update()`, `destroy()` and `list()`actions.

urlpatterns = [
    url(r'^goods/$', good_list),
    url(r'^multimedias/$', good_multimedia_list),
    url(r'^multimedias-with-detailed-good/$', good_multimedia_with_detailed_good_list),
]





